package com.idealighter.game.core.dao.generate.mapper;

import com.idealighter.game.core.dao.generate.domain.WhiteListDomain;
import com.idealighter.game.core.dao.generate.domain.WhiteListDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WhiteListDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=WhiteListDomainSqlProvider.class, method="countByExample")
    long countByExample(WhiteListDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @DeleteProvider(type=WhiteListDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(WhiteListDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Delete({
        "delete from white_list",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Insert({
        "insert into white_list (account)",
        "values (#{account,jdbcType=VARCHAR})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(WhiteListDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @InsertProvider(type=WhiteListDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(WhiteListDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=WhiteListDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="account", property="account", jdbcType=JdbcType.VARCHAR)
    })
    List<WhiteListDomain> selectByExample(WhiteListDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Select({
        "select",
        "id, account",
        "from white_list",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="account", property="account", jdbcType=JdbcType.VARCHAR)
    })
    WhiteListDomain selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=WhiteListDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WhiteListDomain record, @Param("example") WhiteListDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=WhiteListDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WhiteListDomain record, @Param("example") WhiteListDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=WhiteListDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WhiteListDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table white_list
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Update({
        "update white_list",
        "set account = #{account,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(WhiteListDomain record);
}